package rx.genarator.comprehension;

import java.util.HashMap;
import java.util.Map;

public class Table extends TableOrView {
	
	private static Map<String ,Table> map=new HashMap<String, Table>();
	
	private synchronized static void addTable(Table table){
		map.put(table.getName(), table);
	}

	public static Table getByName(String name){
		return map.get(name);
	}
	
	public Table(DataBase dataBase, String id, String name, String code, String comment) {
		super(dataBase, id, name, code, comment);
		addTable(this);
	}
	
}
